package com.sljy.hzk.entity;

import android.text.TextUtils;

import com.chad.library.adapter.base.entity.MultiItemEntity;

import java.util.List;

/**
 * Created  on 2018/7/12 0012
 *
 * @author 唐开阔
 * @describe 考试的错题详情
 */
public class ExamErrDetailEntity {


    private List<SubjectBean> allList;
    private List<SubjectBean> errList;

    public List<SubjectBean> getAllList() {
        return allList;
    }

    public void setAllList(List<SubjectBean> allList) {
        this.allList = allList;
    }

    public List<SubjectBean> getErrList() {
        return errList;
    }

    public void setErrList(List<SubjectBean> errList) {
        this.errList = errList;
    }


    public static class SubjectBean implements MultiItemEntity {
        public static final int TYPE_ITEN = 1;
        public static final int TYPE_HEAD = 2;

        /**
         * flag : false
         * queId : 15
         * answer : D
         * sort : 3
         */
        private boolean flag;
        private int queId;
        private String answer;
        private String headName;
        private int sort;
        private String trueAnswer;
        private boolean isErrorList;

        public SubjectBean(String headName) {
            this.headName = headName;
        }

        public String getTrueAnswer() {
            return trueAnswer;
        }

        public void setTrueAnswer(String trueAnswer) {
            this.trueAnswer = trueAnswer;
        }

        public boolean isErrorList() {
            return isErrorList;
        }

        public void setErrorList(boolean errorList) {
            isErrorList = errorList;
        }

        public boolean isFlag() {
            return flag;
        }

        public String getHeadName() {
            return headName;
        }

        public void setHeadName(String headName) {
            this.headName = headName;
        }

        public void setFlag(boolean flag) {
            this.flag = flag;
        }

        public int getQueId() {
            return queId;
        }

        public void setQueId(int queId) {
            this.queId = queId;
        }

        public String getAnswer() {
            return answer;
        }

        public void setAnswer(String answer) {
            this.answer = answer;
        }

        public int getSort() {
            return sort;
        }

        public void setSort(int sort) {
            this.sort = sort;
        }

        @Override
        public int getItemType() {
            return TextUtils.isEmpty(headName) ? TYPE_ITEN : TYPE_HEAD ;
        }
    }
}
